Fix unit tests race condition#340
Conversation
In places where the goroutine is spawned, the channels passed into the methods should not be inherited from previous block, or in a parallel environment the variables could be overritten or closed by another routine. Passing the variables via argument will ensure such thing won't appear, and operations will be atomic.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@Danil-Grigorev: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
I think this race may actually be fixed by #337 (I saw the error before and included a "fix"(?) for it in that PR) |
|
/close fixed with #337 |
In places where the goroutine is spawned, the channels passed into
the methods should not be inherited from the previous block, or in
a parallel environment the variables could be overwritten or closed
by another routine. Passing the variables via argument will ensure
such a thing won't appear, and operations will be atomic.
CI failure example: